package com.keyware.kd.utils;

import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.util.Properties;

@Component
public class RemoteProperties {
    public static String API_URL;
    // 静态初始化块加载properties文件
    static {
        try {
            Properties props = PropertiesLoaderUtils.loadAllProperties("remote.properties");
            API_URL = props.getProperty("remoteUrl");
        } catch (IOException e) {
            throw new RuntimeException("Failed to load properties file", e);
        }
    }

}
